// base directory should be /users/rules
// Cat = category (i.e. SPAM)
// Subcat = subcategory (i.e. phishing)

void addCat(const char* cat);
void removeCat(const char* cat);
bool catExists(const char* cat);

void addSubcat(const char* cat, const char* subcat, float weight);
void removeSubcat(const char* cat, const char* subcat);
float changeSubcatWeight(const char* cat, const char* subcat, float weight);
bool subcatExists(const char* cat, const char* subcat);

void addPhrase(const char* cat, const char* subcat, const char* phrase, float weight);
void removePhrase(const char* cat, const char* subcat, const char* phrase);
float changePhraseWeight(const char* cat, const char* subcat, const char* phrase, float weight);
bool phraseExists(const char* cat, const char* subcat, const char* phrase);

void applyRule(const char* cat, const char* user, const char* filepath, bool isTemp);
